/******************************************************************************
** File: sbn_constants.h
**
**      Copyright (c) 2004-2016, United States government as represented by the
**      administrator of the National Aeronautics Space Administration.
**      All rights reserved. This software(cFE) was created at NASA's Goddard
**      Space Flight Center pursuant to government contracts.
**
**      This software may be used only pursuant to a United States government
**      sponsored project and the United States government may not be charged
**      for use thereof.
**
** Purpose:
**      This header file contains prototypes for private functions and type
**      definitions for the Software Bus Network Application.
**
** Authors:   J. Wilmot/GSFC Code582
**            R. McGraw/SSI
**            C. Knight/ARC Code TI
******************************************************************************/
#include "cfe.h"

#ifndef _sbn_constants_h_
#define _sbn_constants_h_

/**
 * Below are constants that the user shouldn't have to change, but are useful
 * to know and are shared with modules.
 * If it's a compile-time configuration option, it should be in
 * sbn_platform_cfg.h instead.
 */

#define SBN_SUCCESS                   0
#define SBN_ERROR                     (-1)
#define SBN_IF_EMPTY                  (-2)
#define SBN_NOT_IMPLEMENTED           (-3)

#define SBN_UDP                       1
#define SBN_TCP                       2
#define SBN_SPACEWIRE_RMAP            3
#define SBN_SPACEWIRE_PKT             4
#define SBN_SHMEM                     5
#define SBN_SERIAL                    6
#define SBN_1553                      7
#define SBN_DTN                       8

/**
 * Message types definitions, reserve the high 128 values for module-specific
 * message types.
 */
#define SBN_NO_MSG                  0x00 /**< @brief no payload */
#define SBN_SUB_MSG                 0x01 /**< @brief payload is subs */
#define SBN_UNSUB_MSG               0x02 /**< @brief payload is unsubs */
#define SBN_APP_MSG                 0x03 /**< @brief payload is SB msg */
#define SBN_PROTO_MSG               0x04 /**< @brief payload is SBN proto */

/**
 * @brief Generated by GIT. Used to ensure peers are running the same
 * version of code.
 *
 * @TODO need to add the exchange back in, used to be exchanged as part of
 * announcements.
 */
#define SBN_IDENT           "$Id$"

/** @brief Id is always the same len, plus \0 */
#define SBN_IDENT_LEN       48

#define SBN_PROTO_VER	10

#endif /* _sbn_constants_h_ */
